import React from 'react'
import Login from './pages/login'
import Admin from './pages/admin'
import { Switch,Route,Redirect } from 'react-router-dom'
import { store } from './store'
import { Provider } from 'react-redux'
import yztoken from './utils/yztoken'
 function App() {
  return (<Provider store={store}>
    <div>
      <Switch>
        <Route path="/login" component={Login}></Route>
        <Route path="/admin" component={Admin}></Route>
        <Redirect from="" to="/admin"></Redirect>
      </Switch>
    </div>
    </Provider>
  )
}
export default yztoken(App)